﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_INV_DIVERT_ORDER
// * CreateDate    : 2012/10/10 10:09:38
// * Creater       : CodeSmith
// * LastChangeDate: 2012/10/10 10:09:38
// * LastChanger   : 2012/10/10 10:09:38
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class InvDivertOrderEntity : EntityBase
    {
        public InvDivertOrderTable TableSchema
        {
            get
            {
                return InvDivertOrderTable.Current;
            }
        }

        public InvDivertOrderEntity()
        {

        }

        public InvDivertOrderEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.DivertOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DIVERT_ORDER_ID"]));
            this.OutWarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["OUT_WAREHOUSE_CODE"]));
            this.InWarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["IN_WAREHOUSE_CODE"]));
            this.OutLocationId = Convert.ToString(CommonFunctions.ToObject(dr["OUT_LOCATION_ID"]));
            this.InLocationId = Convert.ToString(CommonFunctions.ToObject(dr["IN_LOCATION_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
            this.OrderPerson = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON"]));
            this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public InvDivertOrderEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.DivertOrderId = Convert.ToString(CommonFunctions.ToObject(dr["DIVERT_ORDER_ID"]));
            this.OutWarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["OUT_WAREHOUSE_CODE"]));
            this.InWarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["IN_WAREHOUSE_CODE"]));
            this.OutLocationId = Convert.ToString(CommonFunctions.ToObject(dr["OUT_LOCATION_ID"]));
            this.InLocationId = Convert.ToString(CommonFunctions.ToObject(dr["IN_LOCATION_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.Qty = Convert.ToDecimal(CommonFunctions.ToObject(dr["QTY"]));
            this.OrderType = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_TYPE"]));
            this.OrderCode = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_CODE"]));
            this.OrderDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["ORDER_DATE"]));
            this.OrderPerson = Convert.ToString(CommonFunctions.ToObject(dr["ORDER_PERSON"]));
            this.RelatedOrder = Convert.ToString(CommonFunctions.ToObject(dr["RELATED_ORDER"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
            this.CreatedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["CREATED_DATE"]));
            this.CreatedBy = Convert.ToString(CommonFunctions.ToObject(dr["CREATED_BY"]));
            this.LastModifiedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["LAST_MODIFIED_DATE"]));
            this.LastModifiedBy = Convert.ToString(CommonFunctions.ToObject(dr["LAST_MODIFIED_BY"]));
            this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
            this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
            this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return InvDivertOrderTable.Current;
            }
        }

        #region Perporty List
        public string DivertOrderId
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_DIVERT_ORDER_ID)); }
            set { SetData(InvDivertOrderTable.C_DIVERT_ORDER_ID, value); }
        }

        public string OutWarehouseCode
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_OUT_WAREHOUSE_CODE)); }
            set { SetData(InvDivertOrderTable.C_OUT_WAREHOUSE_CODE, value); }
        }

        public string InWarehouseCode
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_IN_WAREHOUSE_CODE)); }
            set { SetData(InvDivertOrderTable.C_IN_WAREHOUSE_CODE, value); }
        }

        public string OutLocationId
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_OUT_LOCATION_ID)); }
            set { SetData(InvDivertOrderTable.C_OUT_LOCATION_ID, value); }
        }

        public string InLocationId
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_IN_LOCATION_ID)); }
            set { SetData(InvDivertOrderTable.C_IN_LOCATION_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_PRODUCT_ID)); }
            set { SetData(InvDivertOrderTable.C_PRODUCT_ID, value); }
        }

        public decimal Qty
        {
            get { return Convert.ToDecimal(GetData(InvDivertOrderTable.C_QTY)); }
            set { SetData(InvDivertOrderTable.C_QTY, value); }
        }

        public string OrderType
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_ORDER_TYPE)); }
            set { SetData(InvDivertOrderTable.C_ORDER_TYPE, value); }
        }

        public string OrderCode
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_ORDER_CODE)); }
            set { SetData(InvDivertOrderTable.C_ORDER_CODE, value); }
        }

        public DateTime OrderDate
        {
            get { return Convert.ToDateTime(GetData(InvDivertOrderTable.C_ORDER_DATE)); }
            set { SetData(InvDivertOrderTable.C_ORDER_DATE, value); }
        }

        public string OrderPerson
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_ORDER_PERSON)); }
            set { SetData(InvDivertOrderTable.C_ORDER_PERSON, value); }
        }

        public string RelatedOrder
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_RELATED_ORDER)); }
            set { SetData(InvDivertOrderTable.C_RELATED_ORDER, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_REMARK)); }
            set { SetData(InvDivertOrderTable.C_REMARK, value); }
        }

        public DateTime CreatedDate
        {
            get { return Convert.ToDateTime(GetData(InvDivertOrderTable.C_CREATED_DATE)); }
            set { SetData(InvDivertOrderTable.C_CREATED_DATE, value); }
        }

        public string CreatedBy
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_CREATED_BY)); }
            set { SetData(InvDivertOrderTable.C_CREATED_BY, value); }
        }

        public DateTime LastModifiedDate
        {
            get { return Convert.ToDateTime(GetData(InvDivertOrderTable.C_LAST_MODIFIED_DATE)); }
            set { SetData(InvDivertOrderTable.C_LAST_MODIFIED_DATE, value); }
        }

        public string LastModifiedBy
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_LAST_MODIFIED_BY)); }
            set { SetData(InvDivertOrderTable.C_LAST_MODIFIED_BY, value); }
        }

        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(InvDivertOrderTable.C_APPROVED_DATE)); }
            set { SetData(InvDivertOrderTable.C_APPROVED_DATE, value); }
        }

        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_APPROVED_BY)); }
            set { SetData(InvDivertOrderTable.C_APPROVED_BY, value); }
        }

        public string Status
        {
            get { return Convert.ToString(GetData(InvDivertOrderTable.C_STATUS)); }
            set { SetData(InvDivertOrderTable.C_STATUS, value); }
        }

        #endregion
    }


}

